<template>
  <Dialog title="详情" v-model="dialogVisible" width="80%" center>
    <Info :data="data" />
  </Dialog>
</template>
<script setup lang="ts">
import * as BrokerageWithdrawApi from '@/api/blind/BrokerageWithdraw'
import Info from './components/Info.vue'

const dialogVisible = ref(false) // 弹窗的是否展示
const data = ref<BrokerageWithdrawApi.BrokerageWithdrawVO>(
  {} as BrokerageWithdrawApi.BrokerageWithdrawVO
)

/** 打开弹窗 */
const open = async (id?: number) => {
  dialogVisible.value = true
  // 修改时，设置数据
  if (id) {
    data.value = await BrokerageWithdrawApi.getBrokerageWithdraw(id)
  }
}
defineExpose({ open }) // 提供 open 方法，用于打开弹
</script>
<style scoped lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
